3.15 \(\int \cot ^4(c+d x) (a+a \sec (c+d x)) \, dx\)

Optimal. Leaf size=55 \[ -\frac{\cot ^3(c+d x) (a \sec (c+d x)+a)}{3 d}+\frac{\cot (c+d x) (2 a \sec (c+d x)+3 a)}{3 d}+a x \]

[Out]

a*x - (Cot[c + d*x]^3*(a + a*Sec[c + d*x]))/(3*d) + (Cot[c + d*x]*(3*a + 2*a*Sec[c + d*x]))/(3*d)

________________________________________________________________________________________

Rubi [A]  time = 0.0517449, antiderivative size = 55, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.105, Rules used = {3882, 8} \[ -\frac{\cot ^3(c+d x) (a \sec (c+d x)+a)}{3 d}+\frac{\cot (c+d x) (2 a \sec (c+d x)+3 a)}{3 d}+a x \]

Antiderivative was successfully verified.

[In]

Int[Cot[c + d*x]^4*(a + a*Sec[c + d*x]),x]

[Out]

a*x - (Cot[c + d*x]^3*(a + a*Sec[c + d*x]))/(3*d) + (Cot[c + d*x]*(3*a + 2*a*Sec[c + d*x]))/(3*d)

Rule 3882

Int[(cot[(c_.) + (d_.)*(x_)]*(e_.))^(m_)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> -Simp[((e*Cot[c
+ d*x])^(m + 1)*(a + b*Csc[c + d*x]))/(d*e*(m + 1)), x] - Dist[1/(e^2*(m + 1)), Int[(e*Cot[c + d*x])^(m + 2)*(
a*(m + 1) + b*(m + 2)*Csc[c + d*x]), x], x] /; FreeQ[{a, b, c, d, e}, x] && LtQ[m, -1]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rubi steps

\begin{align*} \int \cot ^4(c+d x) (a+a \sec (c+d x)) \, dx &=-\frac{\cot ^3(c+d x) (a+a \sec (c+d x))}{3 d}+\frac{1}{3} \int \cot ^2(c+d x) (-3 a-2 a \sec (c+d x)) \, dx\\ &=-\frac{\cot ^3(c+d x) (a+a \sec (c+d x))}{3 d}+\frac{\cot (c+d x) (3 a+2 a \sec (c+d x))}{3 d}+\frac{1}{3} \int 3 a \, dx\\ &=a x-\frac{\cot ^3(c+d x) (a+a \sec (c+d x))}{3 d}+\frac{\cot (c+d x) (3 a+2 a \sec (c+d x))}{3 d}\\ \end{align*}

Mathematica [C]  time = 0.0386997, size = 62, normalized size = 1.13 \[ -\frac{a \cot ^3(c+d x) \text{Hypergeometric2F1}\left (-\frac{3}{2},1,-\frac{1}{2},-\tan ^2(c+d x)\right )}{3 d}-\frac{a \csc ^3(c+d x)}{3 d}+\frac{a \csc (c+d x)}{d} \]

Antiderivative was successfully verified.

[In]

Integrate[Cot[c + d*x]^4*(a + a*Sec[c + d*x]),x]

[Out]

(a*Csc[c + d*x])/d - (a*Csc[c + d*x]^3)/(3*d) - (a*Cot[c + d*x]^3*Hypergeometric2F1[-3/2, 1, -1/2, -Tan[c + d*
x]^2])/(3*d)

________________________________________________________________________________________

Maple [A]  time = 0.059, size = 86, normalized size = 1.6 \begin{align*}{\frac{1}{d} \left ( a \left ( -{\frac{ \left ( \cot \left ( dx+c \right ) \right ) ^{3}}{3}}+\cot \left ( dx+c \right ) +dx+c \right ) +a \left ( -{\frac{ \left ( \cos \left ( dx+c \right ) \right ) ^{4}}{3\, \left ( \sin \left ( dx+c \right ) \right ) ^{3}}}+{\frac{ \left ( \cos \left ( dx+c \right ) \right ) ^{4}}{3\,\sin \left ( dx+c \right ) }}+{\frac{ \left ( 2+ \left ( \cos \left ( dx+c \right ) \right ) ^{2} \right ) \sin \left ( dx+c \right ) }{3}} \right ) \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(d*x+c)^4*(a+a*sec(d*x+c)),x)

[Out]

1/d*(a*(-1/3*cot(d*x+c)^3+cot(d*x+c)+d*x+c)+a*(-1/3/sin(d*x+c)^3*cos(d*x+c)^4+1/3/sin(d*x+c)*cos(d*x+c)^4+1/3*
(2+cos(d*x+c)^2)*sin(d*x+c)))

________________________________________________________________________________________

Maxima [A]  time = 1.74058, size = 80, normalized size = 1.45 \begin{align*} \frac{{\left (3 \, d x + 3 \, c + \frac{3 \, \tan \left (d x + c\right )^{2} - 1}{\tan \left (d x + c\right )^{3}}\right )} a + \frac{{\left (3 \, \sin \left (d x + c\right )^{2} - 1\right )} a}{\sin \left (d x + c\right )^{3}}}{3 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)^4*(a+a*sec(d*x+c)),x, algorithm="maxima")

[Out]

1/3*((3*d*x + 3*c + (3*tan(d*x + c)^2 - 1)/tan(d*x + c)^3)*a + (3*sin(d*x + c)^2 - 1)*a/sin(d*x + c)^3)/d

________________________________________________________________________________________

Fricas [A]  time = 0.905865, size = 177, normalized size = 3.22 \begin{align*} \frac{4 \, a \cos \left (d x + c\right )^{2} - a \cos \left (d x + c\right ) + 3 \,{\left (a d x \cos \left (d x + c\right ) - a d x\right )} \sin \left (d x + c\right ) - 2 \, a}{3 \,{\left (d \cos \left (d x + c\right ) - d\right )} \sin \left (d x + c\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)^4*(a+a*sec(d*x+c)),x, algorithm="fricas")

[Out]

1/3*(4*a*cos(d*x + c)^2 - a*cos(d*x + c) + 3*(a*d*x*cos(d*x + c) - a*d*x)*sin(d*x + c) - 2*a)/((d*cos(d*x + c)
 - d)*sin(d*x + c))

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} a \left (\int \cot ^{4}{\left (c + d x \right )} \sec{\left (c + d x \right )}\, dx + \int \cot ^{4}{\left (c + d x \right )}\, dx\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)**4*(a+a*sec(d*x+c)),x)

[Out]

a*(Integral(cot(c + d*x)**4*sec(c + d*x), x) + Integral(cot(c + d*x)**4, x))

________________________________________________________________________________________

Giac [A]  time = 1.45963, size = 76, normalized size = 1.38 \begin{align*} \frac{12 \,{\left (d x + c\right )} a - 3 \, a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + \frac{12 \, a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - a}{\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3}}}{12 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)^4*(a+a*sec(d*x+c)),x, algorithm="giac")

[Out]

1/12*(12*(d*x + c)*a - 3*a*tan(1/2*d*x + 1/2*c) + (12*a*tan(1/2*d*x + 1/2*c)^2 - a)/tan(1/2*d*x + 1/2*c)^3)/d